Skip to main content

Meta Withdraw

Create a meta-transaction message payload to withdraw voucher balances.

Request URL

https://testnet.api.euclidprotocol.com/api/v1/execute/meta-txn/withdraw

Example

curl -X 'POST'   'https://testnet.api.euclidprotocol.com/api/v1/execute/meta-txn/withdraw'   -H 'accept: application/json'   -H 'Content-Type: application/json'   -d '{
  "amount": "90000",
  "cross_chain_addresses": [
    {
      "user": {
        "address": "lumen10f4xyp6sq3g47yf6m8dfxh233r878wqjegmtug",
        "chain_uid": "lumen"
      },
      "amount": {
        "less_than_or_equal": "90000"
      },
      "denom": {
        "voucher": {}
      },
      "forwarding_message": "",
      "unsafe_refund_as_voucher": false
    }
  ],
  "sender": {
    "address": "lumen10f4xyp6sq3g47yf6m8dfxh233r878wqjegmtug",
    "chain_uid": "lumen"
  },
  "timeout": "60",
  "token": "euclid"
}'
{
  "msg": {
    "target": "euclid1yvgh8xeju5dyr0zxlkvq09htvhjj20fncp5g58np4u25g8rkpgjsy5hngy",
    "call_data": "{"transfer_voucher":{...}}"
  },
  "type": "withdraw_voucher",
  "token_in": "",
  "token_out": "",
  "token": "euclid",
  "amount_in": "90000",
  "amount_out": ""
}

Parameters

FieldTypeDescription
amountstringAmount of voucher tokens to withdraw.
tokenstringVoucher token identifier.
senderCrossChainUserWithAmountAddress and chain initiating the meta transaction.
cross_chain_addressesCrossChainAddressWithLimit[]Recipients for the output asset, with optional limits and forwarding.
timeoutstringOptional timeout in seconds.

Response Fields

FieldTypeDescription
msg.targetstringRouter contract address that will receive the message.
msg.call_datastringEncoded contract call data.
typestringTransaction type (withdraw_voucher).
tokenstringToken identifier for this meta message.
amount_instringInput amount tracked for this meta message.